package com.imooc.utils;

/**
 * Created by Youjie on 2017/11/19.
 */
public class ResultUtil {

    public static Result success(){
        
        return success(null);
    }

    public static Result success(Object data){
        Result result = new Result();
        result.setCode(200);
        result.setMessage("成功");
        result.setData(data);
        return result;
    }

    public static Result error(Integer code, String message){
        Result result = new Result();
        result.setCode(code);
        result.setMessage(message);
        return result;
    }
}
